package appconfig

import "github.com/spf13/viper"

type Config struct {
	Mysql struct {
		User     string
		Password string
		Host     string
		Port     int
		Database string
	}
	Redis struct {
		Host     string
		Password string
	}
}

var AppConfig Config

func Init() {
	viper.SetConfigFile("./appconfig/dev.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&AppConfig)
}
